<div class="content-full">        
    {$__model = "site"}
    {Model model="Movie" method="getMovieList"}    
    
    <div class="content-full-left">
        <div class=" scrollbar" rev="link-container">
        <div class="list-content" id="link-container">
            <span style="margin-bottom: 5px;display:block;">
                <a href="#" name="FilmList" id="-1" actived="actived">Opis kategorii</a>
            </span>
            {foreach $movies item=r name=list}
                <span style="margin-bottom: 5px;display:block;">
                <a href="#" name="FilmList" id="{$smarty.foreach.list.index}">{$r.name|upper}</a>
                </span>
            {/foreach}
       </div>
       </div>
       
    </div>    
   
    <script type="text/javascript">
     UI.scrollbar();
    $.fn.generateData = function(url)
    {        
        var _self = $(this);
        $.getJSON(url,function(data)
        {
            _self.find('.realization-thumb').html('<img src="'+data.data.thumbnail.hqDefault+'"/>');
            _self.find('#description').html(data.data.description);
        });
    }
</script>
    <div class="content-full-right">
        <p id="help"></p>
        <h1>{$content.title}</h1>
        <div class="realization" id="-1">
            <p>{$content.content|escape}</p>
        </div>
        
        {foreach $movies item=r name=list}
        <div class="realization" style="display: none;" id="{$smarty.foreach.list.index}">   
            
                <div class="realization-thumb" style="clear: both">></div>                                    
                <div class="realization-desc"><h2 style="height: 50px">{$r.name}</h2>                
                    <button class="blue-button2" id="load-project" onclick="javascript:window.open('http://www.youtube.com/watch?v={$r.link}','_blank')">Zobacz film</button>
                </div>
                <div style="clear: both"></div>
                <div style="margin-top: 5px"><p id="description"></p></div>            
        </div>
        <script type="text/javascript">                
                    $('div[id={$smarty.foreach.list.index}]').generateData("http://gdata.youtube.com/feeds/api/videos/{$r.link}?v=2&alt=jsonc")
        </script>
        {/foreach}
        
    </div>
</div>